package com.zj.study.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 赵赳
 * @since 2021/12/5 00:09
 */
@RestController
public class ProviderController {

    /**
     * test
     *
     * @param name 内容
     * @return demo
     */
    @GetMapping("/demo")
    public String sayHello(@RequestParam("name") String name) {
        return "Hello " + name;
    }

    /**
     * sum test
     * @param a a
     * @param b b
     * @return 结果
     */
    @GetMapping("/feign-demo")
    public int sum(@RequestParam("a") int a, @RequestParam("b") int b) {
        return a + b;
    }

}
